package cn.yerly.sakura.dao.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 * 产品规格
 * 
 * @author yerly
 *
 */
@Entity
public class ItemSpec {
	@Id
	private Long id;
	@ManyToOne
	private Item item;
	@ManyToOne
	private Spec spec;
	@ManyToOne
	private SpecValue specValue;
	private Double price;
	private Integer quantity;
	@ManyToOne
	private Image iamge;
	private String sn;
	private String barcode;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Spec getSpec() {
		return spec;
	}

	public void setSpec(Spec spec) {
		this.spec = spec;
	}

	public SpecValue getSpecValue() {
		return specValue;
	}

	public void setSpecValue(SpecValue specValue) {
		this.specValue = specValue;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Image getIamge() {
		return iamge;
	}

	public void setIamge(Image iamge) {
		this.iamge = iamge;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public String getBarcode() {
		return barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "ItemSpec [id=" + id + ", item=" + item + ", spec=" + spec
				+ ", specValue=" + specValue + ", price=" + price
				+ ", quantity=" + quantity + ", iamge=" + iamge + ", sn=" + sn
				+ ", barcode=" + barcode + ", disabled=" + disabled + "]";
	}

}
